﻿#include "MainWidget.h"


int main()
{
	MainWidget mainWin(300, 300, "Testing 2");
	mainWin.get_uart_information();
	return Fl::run();
}


#if 0
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Output.H>


void copy_out(Fl_Widget* o, void* soc)
{
	Fl_Button* b = (Fl_Button*)o;
	//Fl_Input* iw = (Fl_Input*)b->parent()->child(2);
	Fl_Output* ow = (Fl_Output*)b->parent()->child(0);
	
	ow->value("hello\r\n world");

}

int  main(int argc, char *argv[])
{
	Fl_Window* win = new Fl_Window(300, 300, "Testing 2");

	win->begin();
	Fl_Button*  copy = new Fl_Button(10, 150, 70, 30, "C&opy"); //child 0   : 1st widget
	//Fl_Button* close = new Fl_Button(100, 150, 70, 30, "&Quit"); //child 1    : 2nd widget
	Fl_Input*  out = new Fl_Input(50, 10, 200, 50, "Input");     //child 3   : 4th widget input send data.
	Fl_Input*  out = new Fl_Input(50, 10, 200, 50, "Port");		// uar
	Fl_Input*  out = new Fl_Input(50, 10, 200, 50, "Baud");

	//Fl_Input*  inp = new Fl_Input(50, 100, 140, 30, "In");              //child 2 : 3rd widget
	
	win->end();

	out->callback(copy_out);

	//copy->callback(copy_cb, sock);
	//close->callback(close_cb);
	win->show();
	
	return Fl::run();

}

#endif

